//
//  TaskWithRegister.m
//  DuBai
//
//  Created by lt on 14-3-31.
//  Copyright (c) 2014年 darktm. All rights reserved.
//

#import "TaskWithRegister.h"

#import "LoginObject.h"

@implementation TaskWithRegister

-(void)prepare{
    
    NSMutableDictionary *mDic = [NSMutableDictionary dictionaryWithCapacity:3];
    [mDic setValue:self.username forKey:@"username"];
    [mDic setValue:self.pwd forKey:@"password"];
    [mDic setValue:self.email forKey:@"email"];
    [mDic setValue:self.nickname forKey:@"nickname"];
    
    
    [self startAsyncWithParams:mDic withMethod:@"POST" withURL:[Configure userRegister]];
}

-(id)parese{
    
    if([self.rcvData isKindOfClass:[NSDictionary class]]){
        LoginObject *obj = [[LoginObject alloc] initWithDic:self.rcvData];
        
#warning 能够直接根据路径修改字符串
        DLog(@"%@",[obj valueForKeyPath:@"statu.capitalizedString"]);
        return obj;
    }
    
    return nil;
}

@end
